package com.arron.java基础.static1;

/*
* 本程序证明了A类的多个对象公用一个static属性i
*
*
* */
public class static1 {
    public static void main(String[] args) {
        A aa1 = new A();
        A aa2 = new A();
        A aa3 = new A();
        aa1.i = 20;
        aa2.show();
        System.out.println(aa3.i);
    }
}

class A{
    public static int i=10;
    public void show(){
        System.out.println(i);
    }
}

